package model;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.swing.table.DefaultTableCellRenderer;

public class NumberRenderer extends DefaultTableCellRenderer {
	private static final long serialVersionUID = -8415005543860357229L;

	public NumberRenderer() {
		super();
		setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
	}

	public static void main(String[] args) {
		try {
			DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
			Date str = dateFormat.parse("30/04/1975");
			System.out.println(str);
		} catch (ParseException e) {
			OptionMessenger.showMessageDialog(null, "Ngày chọn không phù hợp",
					"Lỗi", OptionMessenger.ERROR_MESSAGE);
		}
	}

}